package Albums 
{
	import Common.Constants;
	import flash.display.GradientType;
	import flash.display.InterpolationMethod;
	import flash.display.SpreadMethod;
	import flash.display.Sprite;
	import flash.filters.DropShadowFilter;
	import flash.geom.Matrix;
	/**
	 * ...
	 * @author Serg de Adelantado
	 */
	public class AlbumArrow extends Sprite
	{
		private const WIDTH:int = 32;		
		private var FHeight:int;
		private var FGraphic:Arrow;
		
		public function AlbumArrow(ADirection:int) 
		{
			FHeight = 0;
			scaleX = ADirection;
			filters = [new DropShadowFilter(0, 90 * ADirection, 0, 1, 10, 0, 1, 3)];
			alpha = Constants.ALBUM_ALPHA;			
			FGraphic = new Arrow();
			addChild(FGraphic);
			FGraphic.mouseEnabled = false;
			useHandCursor = buttonMode = true;			
		}
		
		private function DrawBackground():void
		{
			graphics.clear();
			graphics.beginFill(Constants.ALBUM_BACKGROUND, 1);
			graphics.drawRect(0, 0, WIDTH, FHeight);			
			graphics.endFill();
			FGraphic.x = (WIDTH - FGraphic.width) / 2;
			FGraphic.y = (FHeight) / 2;	
		}
		
		public function set Height(AHeight:int):void 
		{
			FHeight = AHeight;
			DrawBackground();
		}
	}
}